{extend name="base" /}
{block name="css"}
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/css/product.css?v={$version|default=100}">
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/css/common.css?v={$version|default=100}">
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/fonts/iconfont.css?v={$version|default=100}">
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/css/product.css?v={$version|default=100}" xmlns="http://www.w3.org/1999/html">
<style>
    ul a{
        color: black;
    }
    .ishover{
        color: #177fef;
    }
</style>
{/block}
{block name="content"}
<div id="container">
    <div id="header"></div>
    <div id="rightside"></div>
    <div class="banner">
        <img class="image" src="https://paidou.cdn.dgyunju.cn/image/allproduct.png" alt="">
        <div class="img-word">
            <h1 class="word-title">{:lang('product')}</h1>
            <p class="word-en">CORPORATE NEWS</p>
            <p class="word-content">{$config['page_product_tip']|default=''}</p>
        </div>
    </div>
    <div id="content">
        <div class="download">
            <h2 class="top">
                {:lang('product')}
            </h2>
            <div class="long-line">
            </div>
        </div>
        <div class="product-list">
            <div class="product-left">
                <div class="top">{:lang('product_categories')}</div>
                <ul class="center-list">
                     <li {if empty($type) } class="ishover" {/if} data-id="0">{:lang('New_Products')}</li>
                    {foreach $categories as $c}
                          <li class="{if $c['ishover'] == 1}ishover{/if}" data-id="{$c['id']}">  {$c['title']}  </li>
                    {/foreach}
                </ul>
            </div>
            <div class="product-right">
                {if $list['total']>0}
                {foreach $list['data'] as $vo}
                <a href="__DOMAIN__/product/{$vo['id']}.html" class="right-list">
                    <div class="right-list-img">
                        <img class="img" src="{$vo['img']|default=$config['logo']}?imageView2/1/w/200" alt="">
                    </div>
                    <div class="right-list-word">
                        <div class="top">{$vo['title']}</div>
                        <ul class="down-content">
                            {foreach $vo['infos'] as $a}
                                {if $a['value']}
                                    <li>{$a['name']}：{$a['value']}</li>
                                {/if}
                            {/foreach}

                        </ul>
                    </div>
                </a>
                 {/foreach}

                {else}

                <div class="no-data">
					<img class="no-img" src="https://paidou.cdn.dgyunju.cn/image/nodata.png" alt="">
					<p>{:lang('no_data')}~</p>
				</div>
                {/if}
        </div>
    </div>
    </div>
    <div id="pagination" class="l-page"></div>

    <div id="footer"></div>
    
{/block}
    {block name="script"}
    <script src="https://paidou.cdn.dgyunju.cn/js/pagination.min.js?v={$version|default=100}"></script>
    <script>
        $(function(){
            $(".center-list li").click(function(){
                let id = $(this).attr('data-id');
                window.location.href = '__DOMAIN__/product.html?type='+id;
            })
            $("#pagination").pagination({
                currentPage:{$list['current_page']|default=1},
                totalPage:{$list['totalPage']|default=1},
                /*是否显示首页、尾页 true：显示 false：不显示*/
                isShow:true,
                /*分页条显示可见页码数量*/
                count:"{$size|default=10}",
                /*第一页显示文字*/
                homePageText:"{:lang('homePageText')}",
                /*最后一页显示文字*/
                endPageText:"{:lang('endPageText')}",
                /*上一页显示文字*/
                prevPageText:"{:lang('prevPageText')}",
                /* 下一页显示文字*/
                nextPageText:"{:lang('nextPageText')}",
                /*点击翻页绑定事件*/
                callback: function(page) {
                    window.location.href = "{:url('/product',['type'=>$type])}&page="+page;
                }
            });
        })
    </script>
{/block}
